Developer Documentation

QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Adding Application-Defined Attribute and Element Types

You can add new application-defined attribute and element types by using Q3XAttributeClass_Register and Q3XElementClass_Register . These functions let an application add a new attribute or element type by registering its methods. A unique object type of TQ3AttributeType or TQ3ElementType is returned, which you can use to set and get the custom attribute or element:

typedef TQ3ElementType TQ3AttributeType;

Q3XAttributeClass_Register

You can use the Q3XAttributeClass_Register function to add a new attribute type to QuickDraw 3D.

TQ3XObjectClass Q3XAttributeClass_Register(
                     TQ3AttributeType    *attributeType,
                     const char          *name,
                     unsigned long       sizeOfElement,
                     TQ3XMetaHandler     metaHandler);
attributeType
A new attribute type, which is returned to you.
name
The new object name, for use in the text metafile.
sizeOfElement
The size, in bytes, required for the new object.
metaHandler
A metahandler that returns nonvirtual methods. This value may be NULL for some classes.

DESCRIPTION

The Q3XAttributeClass_Register function returns, in the attributeType parameter, a new attribute with name name and size sizeOfElement for the metahandler specified by metaHandler.

Q3XElementClass_Register

You can use the Q3XElementClass_Register function to add a new element type to QuickDraw 3D.

TQ3XObjectClass Q3XElementClass_Register(
                     TQ3ElementType     *elementType,
                     const char         *name,
                     unsigned long      sizeOfElement,
                     TQ3XMetaHandler    metaHandler);
elementType
A new element type, which QuickDraw 3D assigns and returns to you.
name
The new object name, for use in the text metafile.
sizeOfElement
The size, in bytes, required for the new object.
metaHandler
A metahandler that returns nonvirtual methods. This value may be NULL for some classes.

DESCRIPTION

The Q3XElementClass_Register function returns, in the elementType parameter, a new element with name name and size sizeOfElement for the metahandler specified by metaHandler.

Copy Methods

Deletion Method

Getting the Size of an Attribute or Element

Inheritance Control and Copying


© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |